package org.flower.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Order implements Serializable {
    private String id;
    private String shouname;
    private String shouphone;
    private String shouaddress;
    private String dingname;
    private String dingphone;
    private Date servicedate;
    private String greetingcardmsg;
    private String content;
    private String couid;
    private Double copewithprice;
    private Double paidinprice;
    private Integer orderstate;
    private Integer userid;
    private Date orderdate;
    private OrderState orderState;

    /**
     * 中文状态名字
     */
    private String orderstateStr;

    /**
     * 字符串日期
     * @return
     */
    private String servicedateStr;
    private String orderdateStr;

    public String getOrderstateStr() {
        return orderstateStr;
    }

    public void setOrderstateStr(String orderstateStr) {
        this.orderstateStr = orderstateStr;
    }

    public String getServicedateStr() {
        return servicedateStr;
    }

    public void setServicedateStr(String servicedateStr) {
        this.servicedateStr = servicedateStr;
    }

    public String getOrderdateStr() {
        return orderdateStr;
    }

    public void setOrderdateStr(String orderdateStr) {
        this.orderdateStr = orderdateStr;
    }

    public OrderState getOrderState() {
        return orderState;
    }

    public void setOrderState(OrderState orderState) {
        this.orderState = orderState;
    }

    public Order() {
    }

    public double getSumPrice() {
        return sumPrice;
    }

    public void setSumPrice(double sumPrice) {
        this.sumPrice += sumPrice;
    }
    //总价格
    private double sumPrice;

    //总数量
    private int  sumNum;

    public int getSumNum() {
        return sumNum;
    }

    public void setSumNum(int sumNum) {
        this.sumNum += sumNum;
    }

    /**
     * 订单详情集合
     */
    private List<OrderDetails> orderDetailsList;


    /**
     * 商品详细信息列表
     */
    private List<CommodityDetails> commodityDetailsList;

    public List<CommodityDetails> getCommodityDetailsList() {
        return commodityDetailsList;
    }

    public void setCommodityDetailsList(List<CommodityDetails> commodityDetailsList) {
        this.commodityDetailsList = commodityDetailsList;
    }

    public Order(String id, String shouname, String shouphone, String shouaddress, String dingname, String dingphone, Date servicedate, String greetingcardmsg, String content, String couid, Double copewithprice, Double paidinprice, Integer orderstate, Integer userid, Date orderdate) {
        this.id = id;
        this.shouname = shouname;
        this.shouphone = shouphone;
        this.shouaddress = shouaddress;
        this.dingname = dingname;
        this.dingphone = dingphone;
        this.servicedate = servicedate;
        this.greetingcardmsg = greetingcardmsg;
        this.content = content;
        this.couid = couid;
        this.copewithprice = copewithprice;
        this.paidinprice = paidinprice;
        this.orderstate = orderstate;
        this.userid = userid;
        this.orderdate = orderdate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getShouname() {
        return shouname;
    }

    public void setShouname(String shouname) {
        this.shouname = shouname;
    }

    public String getShouphone() {
        return shouphone;
    }

    public void setShouphone(String shouphone) {
        this.shouphone = shouphone;
    }

    public String getShouaddress() {
        return shouaddress;
    }

    public void setShouaddress(String shouaddress) {
        this.shouaddress = shouaddress;
    }

    public String getDingname() {
        return dingname;
    }

    public void setDingname(String dingname) {
        this.dingname = dingname;
    }

    public String getDingphone() {
        return dingphone;
    }

    public void setDingphone(String dingphone) {
        this.dingphone = dingphone;
    }

    public Date getServicedate() {
        return servicedate;
    }

    public void setServicedate(Date servicedate) {
        this.servicedate = servicedate;
    }

    public String getGreetingcardmsg() {
        return greetingcardmsg;
    }

    public void setGreetingcardmsg(String greetingcardmsg) {
        this.greetingcardmsg = greetingcardmsg;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCouid() {
        return couid;
    }

    public void setCouid(String couid) {
        this.couid = couid;
    }

    public Double getCopewithprice() {
        return copewithprice;
    }

    public void setCopewithprice(Double copewithprice) {
        this.copewithprice = copewithprice;
    }

    public Double getPaidinprice() {
        return paidinprice;
    }

    public void setPaidinprice(Double paidinprice) {
        this.paidinprice = paidinprice;
    }

    public Integer getOrderstate() {
        return orderstate;
    }

    public void setOrderstate(Integer orderstate) {
        this.orderstate = orderstate;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Date getOrderdate() {
        return orderdate;
    }

    public void setOrderdate(Date orderdate) {
        this.orderdate = orderdate;
    }

    public List<OrderDetails> getOrderDetailsList() {
        return orderDetailsList;
    }

    public void setOrderDetailsList(List<OrderDetails> orderDetailsList) {
        this.orderDetailsList = orderDetailsList;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", shouname='" + shouname + '\'' +
                ", shouphone='" + shouphone + '\'' +
                ", shouaddress='" + shouaddress + '\'' +
                ", dingname='" + dingname + '\'' +
                ", dingphone='" + dingphone + '\'' +
                ", servicedate=" + servicedate +
                ", greetingcardmsg='" + greetingcardmsg + '\'' +
                ", content='" + content + '\'' +
                ", couid='" + couid + '\'' +
                ", copewithprice=" + copewithprice +
                ", paidinprice=" + paidinprice +
                ", orderstate=" + orderstate +
                ", userid=" + userid +
                ", orderdate=" + orderdate +
                ", orderState=" + orderState +
                ", orderstateStr='" + orderstateStr + '\'' +
                ", servicedateStr='" + servicedateStr + '\'' +
                ", orderdateStr='" + orderdateStr + '\'' +
                ", sumPrice=" + sumPrice +
                ", orderDetailsList=" + orderDetailsList +
                ", commodityDetailsList=" + commodityDetailsList +
                '}';
    }
}